package com.hengpeng.itfinoss.service;

import java.util.List;

import com.hengpeng.common.persist.entity.AbstractEntity;
import com.hengpeng.common.persist.query.DynamicQuery;
import com.hengpeng.itfinbase.message.ResponseMessage;
import com.hengpeng.itfinbase.message.TransMessage;

/**
 * 远程查询数据接口
 * @author lmm
 * @version 20120528
 */

public interface RemoteService {
	
	/**
	 * 返回对象
	 * @param <T>
	 * @param type
	 * @param query
	 * @return
	 */
	<T extends AbstractEntity> List<Object> findObject(Class<T> type, DynamicQuery query);

	/**
	 * 返回对象
	 * @param <T>
	 * @param type
	 * @param query
	 * @return
	 */
	<T extends AbstractEntity> List<Object[]> findObjectArray(Class<T> type, DynamicQuery query);
	
	/**
	 * <pre>
	 * 调用远程交易接口
	 * </pre>
	 * @param transMessage 请求消息
	 * @return 响应消息
	 */
	public ResponseMessage remoteTrans(TransMessage transMessage);

	public <T extends ResponseMessage> T remoteTrans(TransMessage transMessage, Class<T> clz);
	
	
}
